{% extends "base.html" %}
{% load staticfiles %}
{% block title %}登录{% endblock %}

{% block content %}
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="row clearfix">
				<div class="col-md-12 column">
				</div>
			</div>
			<div class="row clearfix">
				<div class="col-md-12 column">
					<div class="row clearfix">
						<div class="col-md-8 column">
						</div>
						<div class="col-md-4 column">
							<div class="page-header text-xl-center" >
						        <h2 style="padding: 30px">欢迎登录</h2>
					        </div>
							<form method="POST" class="form-horizontal" role="form">
                                 {% csrf_token %}
								<div class="form-group">
									 <label for="id_Email" class="col-sm-6 control-label">用户名：</label>
									<div class="col-sm-10">
										<input type="text" class="form-control" required name="id_Username" autofocus/>
									</div>
								</div>
								<div class="form-group">
									 <label for="id_Password" class="col-sm-6 control-label">密码：</label>
									<div class="col-sm-10">
										<input type="password" class="form-control" required name="id_Password" autofocus/>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-offset-2 col-sm-10">
										<div class="checkbox">
											 <label><input type="checkbox" />记住密码</label>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-offset-2 col-sm-10">
										 <button type="submit" class="btn active btn-lg btn-block btn-info">登录</button>
									</div>
								</div>
							</form>
                            {% if message %}
							<div class="alert alert-success alert-dismissable col-sm-offset-2 col-sm-10">
								 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                    <strong>{{ message }}</strong> <a href="/register/" class="alert-link">点击注册</a>
							</div>
                            {% endif %}
						</div>
					</div>
				</div>
			</div>
			<div class="row clearfix">
				<div class="col-md-12 column">
				</div>
			</div>
		</div>
	</div>
</div>
{% endblock %}
